<template>
	<view class="u-p-t-10 u-p-b-10 u-border-bottom u-flex u-row-between">
		<u-image width="220" height="150rpx" :src="item.photo"></u-image>
		<view class="u-flex-1 u-p-20">
			<view class="u-font-32">
				姓名：{{item.name}}
			</view>
			<view class="u-tips-color u-p-t-10 u-p-b-10">
				性别：{{item.sex | getSex}}
			</view>
			<view class="u-light-color">
				电话：{{item.companyphone}}
			</view>
		</view>
		<view class="u-flex-col">
			<u-button class='u-m-b-20' size="mini" plain type="primary" @click="goPage">查看</u-button>
			<u-button size="mini" plain type="primary" @click='call(item.companyphone)'>致电</u-button>
		</view>
	</view>
</template>

<script>
	export default {
		name: "w-house-list",
		props: {
			item: {
				type: Object,
				default: () => {
					return {}
				}
			},
		},
		data() {
			return {

			};
		},
		methods: {
			call(tel) {
				// #ifndef APP-VUE
				uni.makePhoneCall({
					phoneNumber: tel //仅为示例
				});
				// #endif
				
				// #ifdef APP-VUE
				plus.device.dial(tel, true);
				// #endif
			},
			goPage() {
				this.$u.route('/pages/index/housekeeping/detail/detail', {
					id: this.item.id
				});
			}
		}
	}
</script>

<style>

</style>
